home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / pgp20src.zip / MAKEFILE.UNX < prev    next >
Text File  |  1992-09-03  |  7KB  |  207 lines

  1. # makefile for PGP (unix)
  2. #
  3.  
  4. # CFLAGS options:
  5.  
  6. # -DHIGHFIRST if building PGP on a big-endian system
  7. # -DMPORTABLE if there is no assembly version of the mp_smul    function
  8. # -DDEBUG     to include debugging information
  9. # -Dfopen=myfopen
  10. #             if your fopen() doesn't like 'b' as the mode modifier
  11. # -DNOTERMIO  if your system has no termios
  12. # -DDYN_ALLOC if your compiler does not support large static arrays
  13. # -DSMALL_MEM if your machine has a small memory (required for MSDOS)
  14. # For portability to small systems, WSIZE must not be set above 8192.
  15.  
  16. # Define one of:
  17. # -DUNIT32    to use 32 bit units (use only with asm primitives)
  18. # -DPORTABLE  to build the portable version of the RSA primitives
  19. #             (ie if no optimized asm versions are available)
  20. # The above two defines are incompatible.
  21.  
  22. # Define one of:
  23. # -DMERRITT    Merritt's modmult (fast on risc machines)
  24. # -DPEASANT    Russian peasant modulo multiply algorithm
  25. # -DUPTON     default: use Upton's modmult algorithm */
  26.  
  27. # Define one of:
  28. # -DUSE_SELECT to use select() system call
  29. # -DUSE_NBIO   to use non-blocking read()
  30.  
  31. # To define the OS we are compiling under, define one of:
  32. # -DMSDOS, -DUNIX, -DVMS, -DATARI, -DAMIGA
  33.  
  34. CFLAGS= -O -DUNIX -DMPORTABLE -DPORTABLE $(BYTEORDER)
  35.  
  36. # must set byte order for targets "sysv" and "bsd"
  37. # BYTEORDER= -DHIGHFIRST
  38.  
  39. CC      = cc
  40. LD      = cc        # Link command
  41. LDFLAGS    =              # Flags for linker
  42. CPP     = $(CC) -E
  43. MAKE    = make
  44.  
  45. ASM    = $(CC)            # Assembler command
  46. ASMFLAGS = -c        # Flags for assembler
  47.  
  48. OBJS_EXT=            # ASM obj. files
  49. LIBS_EXT=            # Libararies
  50.  
  51. PROJ    =pgp
  52.  
  53. default:
  54.     @echo "type:"
  55.     @echo "  \"make sunspc\"   for Sun with spc compiler"
  56.     @echo "  \"make sungcc\"   for Sun with GNU gcc"
  57.     @echo "  \"make suncc\"    for Sun with cc and unproto (first get unproto, unpack"
  58.     @echo "                  in subdirectory 'unproto')"
  59.     @echo "  \"make sysv\"     for SVR4"
  60.     @echo "  \"make sysv_386\" for SVR4 386 with asm primitives"
  61.     @echo "  \"make x286\"     for XENIX/286 with asm primitives and unproto"
  62.     @echo "  \"make ultrix\"   for DEC 4.2BSD Ultrix"
  63.     @echo "  \"make rs6000\"   for RS6000 AIX"
  64.  
  65.  
  66. all: $(PROJ)
  67.  
  68. 80386.o:    80386.S
  69.     $(CPP) 80386.S > 80386.s
  70.     $(ASM) $(ASMFLAGS) 80386.s
  71.     rm -f 80386.s
  72.  
  73. 8086.o: 8086.asm
  74.     cp 8086.asm 8086.s
  75.     $(ASM) $(ASMFLAGS) 8086.s
  76.     rm -f 8086.s
  77.  
  78. ZIPOBJS= zbits.o zdeflate.o zfile_io.o zglobals.o \
  79.     zinflate.o zip.o zipup.o ztrees.o zunzip.o 
  80.  
  81. OBJ1 =    pgp.o crypto.o keymgmt.o fileio.o \
  82.     mdfile.o more.o armor.o mpilib.o mpiio.o \
  83.     genprime.o rsagen.o random.o idea.o passwd.o \
  84.     md5.o system.o language.o getopt.o keyadd.o \
  85.     config.o keymaint.o charset.o
  86.  
  87. OBJS =    $(OBJ1) $(ZIPOBJS) $(OBJS_EXT)
  88.  
  89. $(PROJ):    $(OBJS)
  90.         $(LD) $(OBJS) -o $(PROJ) $(LDFLAGS) $(LIBS_EXT)
  91.  
  92.  
  93. linux:
  94.     $(MAKE) all CC=gcc LD=gcc OBJS_EXT=80386.o \
  95.     CFLAGS="-O -DUNIX -DUNIT32"
  96.  
  97. sunspc:
  98.     $(MAKE) all CC="ccspc -B/1.8.6/sun4 -ansi -w -I/usr/include" \
  99.     CFLAGS="-O -DUNIX -DHIGHFIRST -DUNIT32 -DMERRITT" \
  100.     OBJS_EXT=sparc.o
  101.  
  102. # Sun with gcc
  103. sungcc:
  104.     $(MAKE) all CC=gcc LD=gcc OBJS_EXT=sparc.o \
  105.     CFLAGS="-O -DUNIX -DHIGHFIRST -DUNIT32 -DMERRITT" \
  106.  
  107. # Sun with standard cc: compile with unproto
  108. suncc: unproto/cpp
  109.     $(MAKE) all CC=cc LD=cc OBJS_EXT=sparc.o \
  110.     CFLAGS="-Qpath unproto -O -DUNIX -DHIGHFIRST -DUNIT32 -DMERRITT"
  111.  
  112. sysv:
  113.     $(MAKE) all CPP=/usr/lib/cpp \
  114.     CFLAGS="-O -DUNIX -DPORTABLE -DMPORTABLE -DUSE_NBIO $(BYTEORDER)"
  115.  
  116. # optimized version with 80386.S
  117. sysv_386:
  118.     $(MAKE) all CPP=/usr/lib/cpp OBJS_EXT=80386.o \
  119.     CFLAGS="-O -DUNIX -DUNIT32 -DUSE_NBIO"
  120.  
  121. # Xenix 286
  122. x286:
  123.     $(MAKE) all CC="ccc.x286 -M2l" LD="cc -M2l" ASM="cc -M2l" \
  124.     OBJS_EXT=8086.o  LDFLAGS="-F 3000" \
  125.     CFLAGS="-LARGE -Ot -DUNIX -DNOPROTO -DSMALL_MEM -DDYN_ALLOC \
  126.     -DUSE_NBIO -Dstrstr=mystrstr"
  127.  
  128. # DEC Ultrix 4.2 BSD with gcc
  129. # -DSIG_DFL=0 may be necessary because of gcc header problem
  130. ultrix:
  131.     $(MAKE) all CC=gcc LD=gcc \
  132.     CFLAGS="-O -DUNIX -DPORTABLE -DMPORTABLE -DUSE_SELECT -DSIG_DFL=0"
  133.  
  134. rs6000:
  135.     $(MAKE) all CFLAGS="-O -DUNIX -DPORTABLE -DMPORTABLE -DUSE_NBIO \
  136.     -DHIGHFIRST -DMERRITT"
  137.  
  138. bsd_old: unproto/unproto
  139.     $(MAKE) all CC=./ccc LD=cc \
  140.     CFLAGS="-O -DUNIX -DPORTABLE -DMPORTABLE $(BYTEORDER) -DBSD_OLD \
  141.         -I. -DNOTERMIO -Dstrstr=mystrstr"
  142.  
  143. #
  144. # unproto for K&R compilers
  145. #
  146. # unproto was posted on comp.sources.misc: v23i012 v23i013
  147. #
  148. # unpack the unproto package in subdirectory unproto
  149. #
  150.  
  151. # unproto: needs preprocessed input
  152. unproto/unproto::
  153.     cd unproto ; $(MAKE) PROG=unproto PIPE=
  154.  
  155. # cpp: pipes through /lib/cpp
  156. unproto/cpp::
  157.     cd unproto ; $(MAKE)
  158.  
  159. clean:
  160.     -rm -f *.o $(PROJ) core a.out tags
  161.  
  162. tags:
  163.     ctags *.c *.h
  164.  
  165.  
  166. ## Dependencies ##
  167.  
  168. config.o : config.c usuals.h pgp.h 
  169. crypto.o : crypto.c mpilib.h usuals.h mpiio.h random.h idea.h crypto.h \
  170.   keymgmt.h mdfile.h md5.h fileio.h language.h pgp.h 
  171. fileio.o : fileio.c random.h usuals.h mpilib.h mpiio.h fileio.h language.h \
  172.   pgp.h 
  173. genprime.o : genprime.c mpilib.h usuals.h genprime.h random.h 
  174. getopt.o : getopt.c 
  175. idea.o : idea.c idea.h usuals.h 
  176. keyadd.o : keyadd.c mpilib.h usuals.h idea.h random.h crypto.h fileio.h \
  177.   keymgmt.h genprime.h rsagen.h mpiio.h language.h pgp.h 
  178. keymaint.o : keymaint.c mpilib.h usuals.h random.h crypto.h fileio.h \
  179.   keymgmt.h mpiio.h language.h pgp.h 
  180. keymgmt.o : keymgmt.c mpilib.h usuals.h idea.h random.h crypto.h fileio.h \
  181.   keymgmt.h genprime.h rsagen.h mpiio.h language.h pgp.h 
  182. language.o : language.c language.h 
  183. mdfile.o : mdfile.c mpilib.h usuals.h mdfile.h md5.h language.h pgp.h 
  184. md5.o : md5.c md5.h 
  185. more.o : more.c mpilib.h usuals.h language.h fileio.h pgp.h 
  186. mpiio.o : mpiio.c mpilib.h usuals.h mpiio.h pgp.h 
  187. mpilib.o : mpilib.c mpilib.h usuals.h 
  188. passwd.o : passwd.c random.h usuals.h md5.h language.h pgp.h 
  189. armor.o : armor.c mpilib.h usuals.h fileio.h mpiio.h language.h pgp.h 
  190. pgp.o : pgp.c mpilib.h usuals.h random.h crypto.h fileio.h keymgmt.h \
  191.   language.h pgp.h 
  192. random.o : random.c random.h usuals.h language.h 
  193. rsagen.o : rsagen.c mpilib.h usuals.h genprime.h rsagen.h random.h 
  194. system.o : system.c 
  195.  
  196. ##
  197.  
  198. zbits.o : zbits.c zip.h ztailor.h ziperr.h 
  199. zdeflate.o : zdeflate.c zip.h ztailor.h ziperr.h 
  200. zfile_io.o : zfile_io.c zunzip.h 
  201. zglobals.o : zglobals.c zip.h ztailor.h ziperr.h 
  202. zinflate.o : zinflate.c zunzip.h 
  203. zip.o : zip.c usuals.h fileio.h language.h pgp.h 
  204. zipup.o : zipup.c zip.h ztailor.h ziperr.h zrevisio.h 
  205. ztrees.o : ztrees.c zip.h ztailor.h ziperr.h 
  206. zunzip.o : zunzip.c zunzip.h 
  207.